﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <title>Image board</title>
    <style type="text/css">
      <!--
      body { font-family: verdana, sans-serif;} }
      img { border:none; }
      #hd { text-align: center; font-size: 3em; padding: .3em;}
      #ft { text-align: center; padding: 1em; }
      .entry { padding: 1.5em; margin-top: 1em;}
      .reply { padding: 1em;}
      .new { padding: 1em;}
      .comment { padding-left: 1em; padding-top: .5em;}
      -->
    </style>
    <link rel="stylesheet" href="/static/css/reset-fonts-grids.css" type="text/css">
  </head>
  <body>
    <div id="doc" class="yui-t7">
      <div id="hd"><h1>Imageboard</h1></div>
      <div id="bd">

        <div class="yui-gb new">
          <div class="yui-u first">&nbsp;</div>
          <div class="yui-u">
          <form id="upload_form" action="/new/" enctype="multipart/form-data" method="post">
            <div><label for="id_file">File:</label> <input type="file" accept="image/png,image/jpeg" name="file" id="id_file" /></div>
            <div><label for="id_comment">Comment:</label><textarea name="comment" rows="5"style="width: 100%;" id="id_comment"></textarea></div>
            {% if parent %}<input type="hidden" name="parent" value="{{ parent }}" />{% endif %}
            <div><input type="submit" value="Submit" /></div>
          </form>
          </div>
          <div class="yui-u">&nbsp;</div>
        </div>

        {% if entries %}
          {% for entry in entries %}
            <div class="yui-gf entry rounded">
              <div class="yui-u first">
      	        <a href="/{{ entry.image.key }}" title="{{ entry.image_size|filesizeformat }}">
                  <img src="/{{ entry.image.key }}?w=150&h=200" />
                </a>
      	      </div>
              <div class="yui-u">
      	        <div>
                  {{ entry.date|date:"Y-m-d H:i:s" }}&nbsp;|&nbsp;<a href="/{{ entry.key }}">Reply</a>
                  {% if admin %}|&nbsp;<a href="/del/{{ entry.key }}">Delete</a>{% endif %}
                </div>
                <div class="comment">{{ entry.comment|escape|linebreaks }}</div>

                {% if entry.replies %}
                  {% for reply in entry.replies %}
                    <div class="yui-gf reply">
                      <div class="yui-u first">
        	              <a href="/{{ reply.image.key }}" title="{{ reply.image_size|filesizeformat }}">
                            <img src="/{{ reply.image.key }}?w=100&h=150" />
                          </a>
        	          </div>
                      <div class="yui-u">
        	            <div>
                          {{ entry.date|date:"Y-m-d H:i:s" }}
                          {% if admin %}|&nbsp;<a href="/del/{{ reply.key }}">Delete</a>{% endif %}
                        </div>
                        <div class="comment">{{ reply.comment|escape|linebreaks }}</div>
                      </div>
                    </div>
                  {% endfor %}
                {% endif %}

      	      </div>
            </div>
          {% endfor %}
        {% endif %}

  	  </div>
      <div id="ft">The site owner is not responsible for any uploaded content.</div>
    </div>
  </body>
</html> 